package com.slz3.business.module.configManagement.conSiteProvince.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conSiteProvince.domain.ConSiteProvince;
import com.slz3.business.module.configManagement.conSiteProvince.domain.ConSiteProvinceCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteProvinceResAtomic {

    static Mono<ServerResponse> add_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvince conSiteProvince) {
        return ConSiteProvinceResSafeValid.add(req, conSiteProvince) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.add(req, conSiteProvince);
    }

    public static Mono<ServerResponse> delete_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        return ConSiteProvinceResSafeValid.delete(req, conSiteProvinceCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvince conSiteProvince) {
        return ConSiteProvinceResSafeValid.modify(req, conSiteProvince) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.modify(req, conSiteProvince);
    }

    static Mono<ServerResponse> info_$ConSiteProvinceUpdateLock(ServerRequest req) {
        return ConSiteProvinceResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        return ConSiteProvinceResSafeValid.auditSubmit(req, conSiteProvinceCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        return ConSiteProvinceResSafeValid.audit(req, conSiteProvinceCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        return ConSiteProvinceResSafeValid.auditReject(req, conSiteProvinceCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        return ConSiteProvinceResSafeValid.usingEnable(req, conSiteProvinceCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$ConSiteProvinceUpdateLock(ServerRequest req, ConSiteProvinceCondition conSiteProvinceCondition) {
        return ConSiteProvinceResSafeValid.usingDisable(req, conSiteProvinceCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteProvinceResExecutor.usingDisable(req);
    }
}
